package com.sr.demo.response;

/**
 * @author liushuai
 * @date 2019/11/3 19:05
 */
public enum NuoSuccessStatus {
    ADD_SUCCESS(200,"添加成功"),
    SAVE_SUCCESS(300,"保存成功"),
    DELETE_SUCCESS(400,"删除成功"),
    SELECT_SUCCESS(500,"查询成功"),
    UPDATE_SUCCESS(600,"修改成功"),
    LOGIN_SUCCESS(700,"用户登录成功"),
    LOGIN_OUT_SUCCESS(800,"用户注销成功"),
    UPLOAD_SUCCESS(900,"上传成功"),
    REFRESH_SUCCESS(1000,"刷新成功"),
    QUALIFIED(3000,"校验通过"),
    USER_CODE_NOT_UNIQUE(3001,"用户编号已存在"),
    DEPT_CODE_NOT_UNIQUE(3002,"组织机构编号已存在"),
    ROLE_CODE_NOT_UNIQUE(3003,"角色编号已存在")
     ;
    private int value;
    private String message;

    @Override
    public String toString() {
        return "{" +
                "\"value\":" + value +
                ", \"message\":\"" + message + '\"' +
                '}';
    }

    NuoSuccessStatus(int value, String message) {
        this.value = value;
        this.message = message;
    }
    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
